package app.domain;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.NotBlank;

import app.validator.Id;

public class Worker {

	private Integer id;
	@Id(message = "员工工号重复")
	private Integer workId;
	@NotNull(message="性别不能为空")
	private Integer sex;
	@NotBlank(message="姓名不能为空")
	private String name;
	@Pattern(regexp="^[1][3,4,5,8][0-9]{9}$", message="手机号格式错误")
	private String tel;
	@NotBlank(message = "请简单描述下技能")
	private String skill;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getWorkId() {
		return workId;
	}
	public void setWorkId(Integer workId) {
		this.workId = workId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public Integer getSex() {
		return sex;
	}
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	public String getSkill() {
		return skill;
	}
	public void setSkill(String skill) {
		this.skill = skill;
	}
	@Override
	public String toString() {
		return "Work [id=" + id + ", workId=" + workId + ", sex=" + sex + ", name=" + name + ", tel=" + tel + ", skill="
				+ skill + "]";
	}
	
}
